#include <bits/stdc++.h>

using namespace std;

struct node{
    int x,y;
    char type;
};
node arr[1001];
int cnt=0;

int judge(int a,int b,int c){
    char flag1='z',flag2='z';
    int i=0;
    while(i<cnt){
        int x=arr[i].x,y=arr[i].y;
        int res=a+x*b+y*c;
        if(res<0){
            if(flag1=='z')flag1=arr[i].type;
            else if(flag1!=arr[i].type){
                return 0;
            }
        }else if(res>0){
            if(flag2=='z')flag2=arr[i].type;
            else if(flag2!=arr[i].type){
                return 0;
            }
        }
        i++;
    }
    return 1;
}

int main(){
    int n,m;scanf("%d%d",&n,&m);
    for(int i=0;i<n;++i,++cnt)
    {
        int x,y;char type;scanf("%d%d%*c%c",&x,&y,&type);
        arr[cnt].x=x;arr[cnt].y=y;arr[cnt].type=type;
    }
    for(int i=0;i<m;++i)
    {
        int a,b,c;scanf("%d%d%d",&a,&b,&c);
        if(judge(a,b,c)){
            printf("Yes\n");
        }
        else printf("No\n");
    }
    return 0;
}